package qldc.pm.qlktcsdldc.model.impl;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.util.PortalUtil;

import com.liferay.portlet.expando.model.ExpandoBridge;
import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;

import qldc.pm.qlktcsdldc.model.NguoiDung;
import qldc.pm.qlktcsdldc.model.NguoiDungModel;

import java.io.Serializable;

import java.sql.Types;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * The base model implementation for the NguoiDung service. Represents a row in the &quot;QLKT_NguoiDung&quot; database table, with each column mapped to a property of this class.
 *
 * <p>
 * This implementation and its corresponding interface {@link qldc.pm.qlktcsdldc.model.NguoiDungModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link NguoiDungImpl}.
 * </p>
 *
 * @author Brian Wing Shun Chan
 * @see NguoiDungImpl
 * @see qldc.pm.qlktcsdldc.model.NguoiDung
 * @see qldc.pm.qlktcsdldc.model.NguoiDungModel
 * @generated
 */
public class NguoiDungModelImpl extends BaseModelImpl<NguoiDung>
    implements NguoiDungModel {
    /*
     * NOTE FOR DEVELOPERS:
     *
     * Never modify or reference this class directly. All methods that expect a nguoi dung model instance should use the {@link qldc.pm.qlktcsdldc.model.NguoiDung} interface instead.
     */
    public static final String TABLE_NAME = "QLKT_NguoiDung";
    public static final Object[][] TABLE_COLUMNS = {
            { "IDQLKT_NguoiDung", Types.BIGINT },
            { "groupId", Types.BIGINT },
            { "companyId", Types.BIGINT },
            { "userId", Types.BIGINT },
            { "userName", Types.VARCHAR },
            { "createDate", Types.TIMESTAMP },
            { "modifiedDate", Types.TIMESTAMP },
            { "TenDangNhap", Types.VARCHAR },
            { "HoVaTen", Types.VARCHAR },
            { "SoCMND", Types.VARCHAR },
            { "IDTinhThuongTru", Types.BIGINT },
            { "IDQuanHuyenThuongTru", Types.BIGINT },
            { "IDPhuongXaThuongTru", Types.BIGINT },
            { "DiaChiThuongTru", Types.VARCHAR },
            { "IDQLKT_DanhMucSoBanNganh", Types.BIGINT },
            { "GioiTinh", Types.INTEGER },
            { "DanToc", Types.BIGINT },
            { "ChuThich", Types.VARCHAR },
            { "deleted", Types.BOOLEAN },
            { "KichHoat", Types.BOOLEAN }
        };
    public static final String TABLE_SQL_CREATE = "create table QLKT_NguoiDung (IDQLKT_NguoiDung LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,TenDangNhap VARCHAR(75) null,HoVaTen VARCHAR(75) null,SoCMND VARCHAR(75) null,IDTinhThuongTru LONG,IDQuanHuyenThuongTru LONG,IDPhuongXaThuongTru LONG,DiaChiThuongTru VARCHAR(75) null,IDQLKT_DanhMucSoBanNganh LONG,GioiTinh INTEGER,DanToc LONG,ChuThich VARCHAR(75) null,deleted BOOLEAN,KichHoat BOOLEAN)";
    public static final String TABLE_SQL_DROP = "drop table QLKT_NguoiDung";
    public static final String ORDER_BY_JPQL = " ORDER BY nguoiDung.IDQLKT_NguoiDung ASC";
    public static final String ORDER_BY_SQL = " ORDER BY QLKT_NguoiDung.IDQLKT_NguoiDung ASC";
    public static final String DATA_SOURCE = "liferayDataSource";
    public static final String SESSION_FACTORY = "liferaySessionFactory";
    public static final String TX_MANAGER = "liferayTransactionManager";
    public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.entity.cache.enabled.qldc.pm.qlktcsdldc.model.NguoiDung"),
            true);
    public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.finder.cache.enabled.qldc.pm.qlktcsdldc.model.NguoiDung"),
            true);
    public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.column.bitmask.enabled.qldc.pm.qlktcsdldc.model.NguoiDung"),
            true);
    public static long IDQLKT_NGUOIDUNG_COLUMN_BITMASK = 1L;
    public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
                "lock.expiration.time.qldc.pm.qlktcsdldc.model.NguoiDung"));
    private static ClassLoader _classLoader = NguoiDung.class.getClassLoader();
    private static Class<?>[] _escapedModelInterfaces = new Class[] {
            NguoiDung.class
        };
    private long _IDQLKT_NguoiDung;
    private long _originalIDQLKT_NguoiDung;
    private boolean _setOriginalIDQLKT_NguoiDung;
    private long _groupId;
    private long _companyId;
    private long _userId;
    private String _userUuid;
    private String _userName;
    private Date _createDate;
    private Date _modifiedDate;
    private String _TenDangNhap;
    private String _HoVaTen;
    private String _SoCMND;
    private long _IDTinhThuongTru;
    private long _IDQuanHuyenThuongTru;
    private long _IDPhuongXaThuongTru;
    private String _DiaChiThuongTru;
    private long _IDQLKT_DanhMucSoBanNganh;
    private int _GioiTinh;
    private long _DanToc;
    private String _ChuThich;
    private Boolean _deleted;
    private Boolean _KichHoat;
    private long _columnBitmask;
    private NguoiDung _escapedModel;

    public NguoiDungModelImpl() {
    }

    @Override
    public long getPrimaryKey() {
        return _IDQLKT_NguoiDung;
    }

    @Override
    public void setPrimaryKey(long primaryKey) {
        setIDQLKT_NguoiDung(primaryKey);
    }

    @Override
    public Serializable getPrimaryKeyObj() {
        return _IDQLKT_NguoiDung;
    }

    @Override
    public void setPrimaryKeyObj(Serializable primaryKeyObj) {
        setPrimaryKey(((Long) primaryKeyObj).longValue());
    }

    @Override
    public Class<?> getModelClass() {
        return NguoiDung.class;
    }

    @Override
    public String getModelClassName() {
        return NguoiDung.class.getName();
    }

    @Override
    public Map<String, Object> getModelAttributes() {
        Map<String, Object> attributes = new HashMap<String, Object>();

        attributes.put("IDQLKT_NguoiDung", getIDQLKT_NguoiDung());
        attributes.put("groupId", getGroupId());
        attributes.put("companyId", getCompanyId());
        attributes.put("userId", getUserId());
        attributes.put("userName", getUserName());
        attributes.put("createDate", getCreateDate());
        attributes.put("modifiedDate", getModifiedDate());
        attributes.put("TenDangNhap", getTenDangNhap());
        attributes.put("HoVaTen", getHoVaTen());
        attributes.put("SoCMND", getSoCMND());
        attributes.put("IDTinhThuongTru", getIDTinhThuongTru());
        attributes.put("IDQuanHuyenThuongTru", getIDQuanHuyenThuongTru());
        attributes.put("IDPhuongXaThuongTru", getIDPhuongXaThuongTru());
        attributes.put("DiaChiThuongTru", getDiaChiThuongTru());
        attributes.put("IDQLKT_DanhMucSoBanNganh", getIDQLKT_DanhMucSoBanNganh());
        attributes.put("GioiTinh", getGioiTinh());
        attributes.put("DanToc", getDanToc());
        attributes.put("ChuThich", getChuThich());
        attributes.put("deleted", getDeleted());
        attributes.put("KichHoat", getKichHoat());

        return attributes;
    }

    @Override
    public void setModelAttributes(Map<String, Object> attributes) {
        Long IDQLKT_NguoiDung = (Long) attributes.get("IDQLKT_NguoiDung");

        if (IDQLKT_NguoiDung != null) {
            setIDQLKT_NguoiDung(IDQLKT_NguoiDung);
        }

        Long groupId = (Long) attributes.get("groupId");

        if (groupId != null) {
            setGroupId(groupId);
        }

        Long companyId = (Long) attributes.get("companyId");

        if (companyId != null) {
            setCompanyId(companyId);
        }

        Long userId = (Long) attributes.get("userId");

        if (userId != null) {
            setUserId(userId);
        }

        String userName = (String) attributes.get("userName");

        if (userName != null) {
            setUserName(userName);
        }

        Date createDate = (Date) attributes.get("createDate");

        if (createDate != null) {
            setCreateDate(createDate);
        }

        Date modifiedDate = (Date) attributes.get("modifiedDate");

        if (modifiedDate != null) {
            setModifiedDate(modifiedDate);
        }

        String TenDangNhap = (String) attributes.get("TenDangNhap");

        if (TenDangNhap != null) {
            setTenDangNhap(TenDangNhap);
        }

        String HoVaTen = (String) attributes.get("HoVaTen");

        if (HoVaTen != null) {
            setHoVaTen(HoVaTen);
        }

        String SoCMND = (String) attributes.get("SoCMND");

        if (SoCMND != null) {
            setSoCMND(SoCMND);
        }

        Long IDTinhThuongTru = (Long) attributes.get("IDTinhThuongTru");

        if (IDTinhThuongTru != null) {
            setIDTinhThuongTru(IDTinhThuongTru);
        }

        Long IDQuanHuyenThuongTru = (Long) attributes.get(
                "IDQuanHuyenThuongTru");

        if (IDQuanHuyenThuongTru != null) {
            setIDQuanHuyenThuongTru(IDQuanHuyenThuongTru);
        }

        Long IDPhuongXaThuongTru = (Long) attributes.get("IDPhuongXaThuongTru");

        if (IDPhuongXaThuongTru != null) {
            setIDPhuongXaThuongTru(IDPhuongXaThuongTru);
        }

        String DiaChiThuongTru = (String) attributes.get("DiaChiThuongTru");

        if (DiaChiThuongTru != null) {
            setDiaChiThuongTru(DiaChiThuongTru);
        }

        Long IDQLKT_DanhMucSoBanNganh = (Long) attributes.get(
                "IDQLKT_DanhMucSoBanNganh");

        if (IDQLKT_DanhMucSoBanNganh != null) {
            setIDQLKT_DanhMucSoBanNganh(IDQLKT_DanhMucSoBanNganh);
        }

        Integer GioiTinh = (Integer) attributes.get("GioiTinh");

        if (GioiTinh != null) {
            setGioiTinh(GioiTinh);
        }

        Long DanToc = (Long) attributes.get("DanToc");

        if (DanToc != null) {
            setDanToc(DanToc);
        }

        String ChuThich = (String) attributes.get("ChuThich");

        if (ChuThich != null) {
            setChuThich(ChuThich);
        }

        Boolean deleted = (Boolean) attributes.get("deleted");

        if (deleted != null) {
            setDeleted(deleted);
        }

        Boolean KichHoat = (Boolean) attributes.get("KichHoat");

        if (KichHoat != null) {
            setKichHoat(KichHoat);
        }
    }

    @Override
    public long getIDQLKT_NguoiDung() {
        return _IDQLKT_NguoiDung;
    }

    @Override
    public void setIDQLKT_NguoiDung(long IDQLKT_NguoiDung) {
        _columnBitmask = -1L;

        if (!_setOriginalIDQLKT_NguoiDung) {
            _setOriginalIDQLKT_NguoiDung = true;

            _originalIDQLKT_NguoiDung = _IDQLKT_NguoiDung;
        }

        _IDQLKT_NguoiDung = IDQLKT_NguoiDung;
    }

    public long getOriginalIDQLKT_NguoiDung() {
        return _originalIDQLKT_NguoiDung;
    }

    @Override
    public long getGroupId() {
        return _groupId;
    }

    @Override
    public void setGroupId(long groupId) {
        _groupId = groupId;
    }

    @Override
    public long getCompanyId() {
        return _companyId;
    }

    @Override
    public void setCompanyId(long companyId) {
        _companyId = companyId;
    }

    @Override
    public long getUserId() {
        return _userId;
    }

    @Override
    public void setUserId(long userId) {
        _userId = userId;
    }

    @Override
    public String getUserUuid() throws SystemException {
        return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
    }

    @Override
    public void setUserUuid(String userUuid) {
        _userUuid = userUuid;
    }

    @Override
    public String getUserName() {
        if (_userName == null) {
            return StringPool.BLANK;
        } else {
            return _userName;
        }
    }

    @Override
    public void setUserName(String userName) {
        _userName = userName;
    }

    @Override
    public Date getCreateDate() {
        return _createDate;
    }

    @Override
    public void setCreateDate(Date createDate) {
        _createDate = createDate;
    }

    @Override
    public Date getModifiedDate() {
        return _modifiedDate;
    }

    @Override
    public void setModifiedDate(Date modifiedDate) {
        _modifiedDate = modifiedDate;
    }

    @Override
    public String getTenDangNhap() {
        if (_TenDangNhap == null) {
            return StringPool.BLANK;
        } else {
            return _TenDangNhap;
        }
    }

    @Override
    public void setTenDangNhap(String TenDangNhap) {
        _TenDangNhap = TenDangNhap;
    }

    @Override
    public String getHoVaTen() {
        if (_HoVaTen == null) {
            return StringPool.BLANK;
        } else {
            return _HoVaTen;
        }
    }

    @Override
    public void setHoVaTen(String HoVaTen) {
        _HoVaTen = HoVaTen;
    }

    @Override
    public String getSoCMND() {
        if (_SoCMND == null) {
            return StringPool.BLANK;
        } else {
            return _SoCMND;
        }
    }

    @Override
    public void setSoCMND(String SoCMND) {
        _SoCMND = SoCMND;
    }

    @Override
    public long getIDTinhThuongTru() {
        return _IDTinhThuongTru;
    }

    @Override
    public void setIDTinhThuongTru(long IDTinhThuongTru) {
        _IDTinhThuongTru = IDTinhThuongTru;
    }

    @Override
    public long getIDQuanHuyenThuongTru() {
        return _IDQuanHuyenThuongTru;
    }

    @Override
    public void setIDQuanHuyenThuongTru(long IDQuanHuyenThuongTru) {
        _IDQuanHuyenThuongTru = IDQuanHuyenThuongTru;
    }

    @Override
    public long getIDPhuongXaThuongTru() {
        return _IDPhuongXaThuongTru;
    }

    @Override
    public void setIDPhuongXaThuongTru(long IDPhuongXaThuongTru) {
        _IDPhuongXaThuongTru = IDPhuongXaThuongTru;
    }

    @Override
    public String getDiaChiThuongTru() {
        if (_DiaChiThuongTru == null) {
            return StringPool.BLANK;
        } else {
            return _DiaChiThuongTru;
        }
    }

    @Override
    public void setDiaChiThuongTru(String DiaChiThuongTru) {
        _DiaChiThuongTru = DiaChiThuongTru;
    }

    @Override
    public long getIDQLKT_DanhMucSoBanNganh() {
        return _IDQLKT_DanhMucSoBanNganh;
    }

    @Override
    public void setIDQLKT_DanhMucSoBanNganh(long IDQLKT_DanhMucSoBanNganh) {
        _IDQLKT_DanhMucSoBanNganh = IDQLKT_DanhMucSoBanNganh;
    }

    @Override
    public int getGioiTinh() {
        return _GioiTinh;
    }

    @Override
    public void setGioiTinh(int GioiTinh) {
        _GioiTinh = GioiTinh;
    }

    @Override
    public long getDanToc() {
        return _DanToc;
    }

    @Override
    public void setDanToc(long DanToc) {
        _DanToc = DanToc;
    }

    @Override
    public String getChuThich() {
        if (_ChuThich == null) {
            return StringPool.BLANK;
        } else {
            return _ChuThich;
        }
    }

    @Override
    public void setChuThich(String ChuThich) {
        _ChuThich = ChuThich;
    }

    @Override
    public Boolean getDeleted() {
        return _deleted;
    }

    @Override
    public void setDeleted(Boolean deleted) {
        _deleted = deleted;
    }

    @Override
    public Boolean getKichHoat() {
        return _KichHoat;
    }

    @Override
    public void setKichHoat(Boolean KichHoat) {
        _KichHoat = KichHoat;
    }

    public long getColumnBitmask() {
        return _columnBitmask;
    }

    @Override
    public ExpandoBridge getExpandoBridge() {
        return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
            NguoiDung.class.getName(), getPrimaryKey());
    }

    @Override
    public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
        ExpandoBridge expandoBridge = getExpandoBridge();

        expandoBridge.setAttributes(serviceContext);
    }

    @Override
    public NguoiDung toEscapedModel() {
        if (_escapedModel == null) {
            _escapedModel = (NguoiDung) ProxyUtil.newProxyInstance(_classLoader,
                    _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
        }

        return _escapedModel;
    }

    @Override
    public Object clone() {
        NguoiDungImpl nguoiDungImpl = new NguoiDungImpl();

        nguoiDungImpl.setIDQLKT_NguoiDung(getIDQLKT_NguoiDung());
        nguoiDungImpl.setGroupId(getGroupId());
        nguoiDungImpl.setCompanyId(getCompanyId());
        nguoiDungImpl.setUserId(getUserId());
        nguoiDungImpl.setUserName(getUserName());
        nguoiDungImpl.setCreateDate(getCreateDate());
        nguoiDungImpl.setModifiedDate(getModifiedDate());
        nguoiDungImpl.setTenDangNhap(getTenDangNhap());
        nguoiDungImpl.setHoVaTen(getHoVaTen());
        nguoiDungImpl.setSoCMND(getSoCMND());
        nguoiDungImpl.setIDTinhThuongTru(getIDTinhThuongTru());
        nguoiDungImpl.setIDQuanHuyenThuongTru(getIDQuanHuyenThuongTru());
        nguoiDungImpl.setIDPhuongXaThuongTru(getIDPhuongXaThuongTru());
        nguoiDungImpl.setDiaChiThuongTru(getDiaChiThuongTru());
        nguoiDungImpl.setIDQLKT_DanhMucSoBanNganh(getIDQLKT_DanhMucSoBanNganh());
        nguoiDungImpl.setGioiTinh(getGioiTinh());
        nguoiDungImpl.setDanToc(getDanToc());
        nguoiDungImpl.setChuThich(getChuThich());
        nguoiDungImpl.setDeleted(getDeleted());
        nguoiDungImpl.setKichHoat(getKichHoat());

        nguoiDungImpl.resetOriginalValues();

        return nguoiDungImpl;
    }

    @Override
    public int compareTo(NguoiDung nguoiDung) {
        int value = 0;

        if (getIDQLKT_NguoiDung() < nguoiDung.getIDQLKT_NguoiDung()) {
            value = -1;
        } else if (getIDQLKT_NguoiDung() > nguoiDung.getIDQLKT_NguoiDung()) {
            value = 1;
        } else {
            value = 0;
        }

        if (value != 0) {
            return value;
        }

        return 0;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }

        if (!(obj instanceof NguoiDung)) {
            return false;
        }

        NguoiDung nguoiDung = (NguoiDung) obj;

        long primaryKey = nguoiDung.getPrimaryKey();

        if (getPrimaryKey() == primaryKey) {
            return true;
        } else {
            return false;
        }
    }

    @Override
    public int hashCode() {
        return (int) getPrimaryKey();
    }

    @Override
    public void resetOriginalValues() {
        NguoiDungModelImpl nguoiDungModelImpl = this;

        nguoiDungModelImpl._originalIDQLKT_NguoiDung = nguoiDungModelImpl._IDQLKT_NguoiDung;

        nguoiDungModelImpl._setOriginalIDQLKT_NguoiDung = false;

        nguoiDungModelImpl._columnBitmask = 0;
    }

    @Override
    public CacheModel<NguoiDung> toCacheModel() {
        NguoiDungCacheModel nguoiDungCacheModel = new NguoiDungCacheModel();

        nguoiDungCacheModel.IDQLKT_NguoiDung = getIDQLKT_NguoiDung();

        nguoiDungCacheModel.groupId = getGroupId();

        nguoiDungCacheModel.companyId = getCompanyId();

        nguoiDungCacheModel.userId = getUserId();

        nguoiDungCacheModel.userName = getUserName();

        String userName = nguoiDungCacheModel.userName;

        if ((userName != null) && (userName.length() == 0)) {
            nguoiDungCacheModel.userName = null;
        }

        Date createDate = getCreateDate();

        if (createDate != null) {
            nguoiDungCacheModel.createDate = createDate.getTime();
        } else {
            nguoiDungCacheModel.createDate = Long.MIN_VALUE;
        }

        Date modifiedDate = getModifiedDate();

        if (modifiedDate != null) {
            nguoiDungCacheModel.modifiedDate = modifiedDate.getTime();
        } else {
            nguoiDungCacheModel.modifiedDate = Long.MIN_VALUE;
        }

        nguoiDungCacheModel.TenDangNhap = getTenDangNhap();

        String TenDangNhap = nguoiDungCacheModel.TenDangNhap;

        if ((TenDangNhap != null) && (TenDangNhap.length() == 0)) {
            nguoiDungCacheModel.TenDangNhap = null;
        }

        nguoiDungCacheModel.HoVaTen = getHoVaTen();

        String HoVaTen = nguoiDungCacheModel.HoVaTen;

        if ((HoVaTen != null) && (HoVaTen.length() == 0)) {
            nguoiDungCacheModel.HoVaTen = null;
        }

        nguoiDungCacheModel.SoCMND = getSoCMND();

        String SoCMND = nguoiDungCacheModel.SoCMND;

        if ((SoCMND != null) && (SoCMND.length() == 0)) {
            nguoiDungCacheModel.SoCMND = null;
        }

        nguoiDungCacheModel.IDTinhThuongTru = getIDTinhThuongTru();

        nguoiDungCacheModel.IDQuanHuyenThuongTru = getIDQuanHuyenThuongTru();

        nguoiDungCacheModel.IDPhuongXaThuongTru = getIDPhuongXaThuongTru();

        nguoiDungCacheModel.DiaChiThuongTru = getDiaChiThuongTru();

        String DiaChiThuongTru = nguoiDungCacheModel.DiaChiThuongTru;

        if ((DiaChiThuongTru != null) && (DiaChiThuongTru.length() == 0)) {
            nguoiDungCacheModel.DiaChiThuongTru = null;
        }

        nguoiDungCacheModel.IDQLKT_DanhMucSoBanNganh = getIDQLKT_DanhMucSoBanNganh();

        nguoiDungCacheModel.GioiTinh = getGioiTinh();

        nguoiDungCacheModel.DanToc = getDanToc();

        nguoiDungCacheModel.ChuThich = getChuThich();

        String ChuThich = nguoiDungCacheModel.ChuThich;

        if ((ChuThich != null) && (ChuThich.length() == 0)) {
            nguoiDungCacheModel.ChuThich = null;
        }

        nguoiDungCacheModel.deleted = getDeleted();

        nguoiDungCacheModel.KichHoat = getKichHoat();

        return nguoiDungCacheModel;
    }

    @Override
    public String toString() {
        StringBundler sb = new StringBundler(41);

        sb.append("{IDQLKT_NguoiDung=");
        sb.append(getIDQLKT_NguoiDung());
        sb.append(", groupId=");
        sb.append(getGroupId());
        sb.append(", companyId=");
        sb.append(getCompanyId());
        sb.append(", userId=");
        sb.append(getUserId());
        sb.append(", userName=");
        sb.append(getUserName());
        sb.append(", createDate=");
        sb.append(getCreateDate());
        sb.append(", modifiedDate=");
        sb.append(getModifiedDate());
        sb.append(", TenDangNhap=");
        sb.append(getTenDangNhap());
        sb.append(", HoVaTen=");
        sb.append(getHoVaTen());
        sb.append(", SoCMND=");
        sb.append(getSoCMND());
        sb.append(", IDTinhThuongTru=");
        sb.append(getIDTinhThuongTru());
        sb.append(", IDQuanHuyenThuongTru=");
        sb.append(getIDQuanHuyenThuongTru());
        sb.append(", IDPhuongXaThuongTru=");
        sb.append(getIDPhuongXaThuongTru());
        sb.append(", DiaChiThuongTru=");
        sb.append(getDiaChiThuongTru());
        sb.append(", IDQLKT_DanhMucSoBanNganh=");
        sb.append(getIDQLKT_DanhMucSoBanNganh());
        sb.append(", GioiTinh=");
        sb.append(getGioiTinh());
        sb.append(", DanToc=");
        sb.append(getDanToc());
        sb.append(", ChuThich=");
        sb.append(getChuThich());
        sb.append(", deleted=");
        sb.append(getDeleted());
        sb.append(", KichHoat=");
        sb.append(getKichHoat());
        sb.append("}");

        return sb.toString();
    }

    @Override
    public String toXmlString() {
        StringBundler sb = new StringBundler(64);

        sb.append("<model><model-name>");
        sb.append("qldc.pm.qlktcsdldc.model.NguoiDung");
        sb.append("</model-name>");

        sb.append(
            "<column><column-name>IDQLKT_NguoiDung</column-name><column-value><![CDATA[");
        sb.append(getIDQLKT_NguoiDung());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>groupId</column-name><column-value><![CDATA[");
        sb.append(getGroupId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>companyId</column-name><column-value><![CDATA[");
        sb.append(getCompanyId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>userId</column-name><column-value><![CDATA[");
        sb.append(getUserId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>userName</column-name><column-value><![CDATA[");
        sb.append(getUserName());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>createDate</column-name><column-value><![CDATA[");
        sb.append(getCreateDate());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
        sb.append(getModifiedDate());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>TenDangNhap</column-name><column-value><![CDATA[");
        sb.append(getTenDangNhap());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>HoVaTen</column-name><column-value><![CDATA[");
        sb.append(getHoVaTen());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>SoCMND</column-name><column-value><![CDATA[");
        sb.append(getSoCMND());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>IDTinhThuongTru</column-name><column-value><![CDATA[");
        sb.append(getIDTinhThuongTru());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>IDQuanHuyenThuongTru</column-name><column-value><![CDATA[");
        sb.append(getIDQuanHuyenThuongTru());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>IDPhuongXaThuongTru</column-name><column-value><![CDATA[");
        sb.append(getIDPhuongXaThuongTru());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>DiaChiThuongTru</column-name><column-value><![CDATA[");
        sb.append(getDiaChiThuongTru());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>IDQLKT_DanhMucSoBanNganh</column-name><column-value><![CDATA[");
        sb.append(getIDQLKT_DanhMucSoBanNganh());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>GioiTinh</column-name><column-value><![CDATA[");
        sb.append(getGioiTinh());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>DanToc</column-name><column-value><![CDATA[");
        sb.append(getDanToc());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>ChuThich</column-name><column-value><![CDATA[");
        sb.append(getChuThich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>deleted</column-name><column-value><![CDATA[");
        sb.append(getDeleted());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>KichHoat</column-name><column-value><![CDATA[");
        sb.append(getKichHoat());
        sb.append("]]></column-value></column>");

        sb.append("</model>");

        return sb.toString();
    }
}
